//
//  NSArray+CheckBeyond.m
//  mallbuilderIOS
//
//  Created by yuanfeng on 15/12/4.
//  Copyright © 2015年 yuanfeng01. All rights reserved.
//

#import "NSArray+CheckBeyond.h"


@implementation NSArray (CheckBeyond)
- (id)objectAtIndexCheck:(NSUInteger)index
{
    if (index >= [self count]) {
        //[ShowMessageTool showMessage:[UIApplication sharedApplication].keyWindow andStr:@"数组越界"];
        return nil;
    }
    
    id value = [self objectAtIndex:index];
    if (value == [NSNull null]) {
        //[ShowMessageTool showMessage:[UIApplication sharedApplication].keyWindow andStr:@"数组内容为空"];
        return nil;
    }
    return value;
}
@end
